Component({
  data: {
    selected: 0,
    color: "#333",
    selectedColor: "#ddad2a",
    // list: [{
    //   pagePath: "/pages/index/index",
    //   iconPath: "https://wxgt.chaoxing.com/static/images/bwg/home.png",
    //   selectedIconPath: "https://wxgt.chaoxing.com/static/images/bwg/home.png",
    //   text: "首页"
    // }, {
    //   pagePath: "/pages/mime/mime",
    //   iconPath: "https://wxgt.chaoxing.com/static/images/bwg/my.png",
    //   selectedIconPath: "https://wxgt.chaoxing.com/static/images/bwg/my.png",
    //   text: "我的"
    // }]
    list: [{
      pagePath: "/pages/index/index",
      iconPath: "../assets/images/index.png",
      selectedIconPath: "../assets/images/index_selected.png",
      text: "首页"
    }, {
      pagePath: "/pages/mime/mime",
      iconPath: "../assets/images/my.png",
      selectedIconPath: "../assets/images/my_selected.png",
      text: "我的"
    }]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      console.log(e,'...e')
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({url})
      this.setData({
        selected: data.index
      })
      console.log(data.index,'...index')

      console.log(this.data.selected,'...selected')
    }
  }
})